Convert most awaitBusy calls to assertBusy (#45794)#47112
Merged
pugnascotia merged 5 commits intoelastic:7.xfrom Sep 29, 2019
Merged
Convert most awaitBusy calls to assertBusy (#45794)#47112pugnascotia merged 5 commits intoelastic:7.xfrom
pugnascotia merged 5 commits intoelastic:7.xfrom
Conversation
Backport of elastic#45794 to 7.x. Convert most `awaitBusy` calls to `assertBusy`, and use asserts where possible. Follows on from elastic#28548 by @liketic. There were a small number of places where it didn't make sense to me to call `assertBusy`, so I kept the existing calls but renamed the method to `waitUntil`. This was partly to better reflect its usage, and partly so that anyone trying to add a new call to awaitBusy wouldn't be able to find it. I also didn't change the usage in `TransportStopRollupAction` as the comments state that the local awaitBusy method is a temporary copy-and-paste. Other changes: * Rework `waitForDocs` to scale its timeout. Instead of calling `assertBusy` in a loop, work out a reasonable overall timeout and await just once. * Some tests failed after switching to `assertBusy` and had to be fixed. * Correct the expect templates in AbstractUpgradeTestCase. The ES Security team confirmed that they don't use templates any more, so remove this from the expected templates. Also rewrite how the setup code checks for templates, in order to give more information. * Remove an expected ML template from XPackRestTestConstants The ML team advised that the ML tests shouldn't be waiting for any `.ml-notifications*` templates, since such checks should happen in the production code instead. * Also rework the template checking code in `XPackRestTestHelper` to give more helpful failure messages.
Collaborator
|
Pinging @elastic/es-core-infra |
droberts195
pushed a commit
that referenced
this pull request
Sep 30, 2019
#47289) With this change the test setup for ML config upgrade tests only waits for v6.6+ ML index templates to be installed if the old cluster is running version 6.6.0 or higher. Previously it was always waiting, but timing out without failing the test if the templates were not installed within 10 seconds, effectively just adding a pointless 10 second sleep to BWC tests against versions earlier than 6.6.0. This problem was exposed by #47112. Fixes #47286
droberts195
pushed a commit
that referenced
this pull request
Sep 30, 2019
#47289) With this change the test setup for ML config upgrade tests only waits for v6.6+ ML index templates to be installed if the old cluster is running version 6.6.0 or higher. Previously it was always waiting, but timing out without failing the test if the templates were not installed within 10 seconds, effectively just adding a pointless 10 second sleep to BWC tests against versions earlier than 6.6.0. This problem was exposed by #47112. Fixes #47286
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #45794 to 7.x. Convert most
awaitBusycalls toassertBusy, and use asserts where possible.